<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="DettaglioAnnuncio.aspx.vb" Inherits="TecnoHouse.DettaglioAnnuncio1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="/GUI/css/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
    <script src="/GUI/js/jquery.lightbox-0.5.pack.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&key=<%=apikey %>"></script>
    <script type="text/javascript">
        var geocoder;
        var map;
        function initialize() {
            geocoder = new google.maps.Geocoder();
            var latlng = new google.maps.LatLng(41.114409, 16.495285);
            var myOptions = {
                zoom: 10,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            }
            map = new google.maps.Map(document.getElementById("map"), myOptions);
        }

        function codeAddress() {
            var address = "<%=address %>";
            geocoder.geocode({ 'address': address }, function(results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    map.setCenter(results[0].geometry.location);
                    var marker = new google.maps.Marker({
                        map: map,
                        position: results[0].geometry.location
                    });
                    map.setZoom(16);
                }
            });
        }

        $(function() {
            $("#gallery a").lightBox();
            $("span").tipsy({ gravity: "n" });
            $("#container").tabs({
                show: function(event, ui) {
                    if (ui.panel.id == "mappa") {
                        google.maps.event.trigger(map, 'resize');
                        map.setZoom(map.getZoom());
                        codeAddress();
                    }
                }   
            });
            
            initialize();
            codeAddress();
        });
        
    </script>
    <style type="text/css">
        .ui-widget-content {background: transparent none; border:none}   
        .ui-tabs .ui-tabs-nav {padding: 0}
        .ui-tabs {padding: 0}
        #container .ui-widget-header {background: none; border: none}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
    <h3><span class="icon home"></span><span><%=pagetitle %> <em>-</em></span>Dettaglio Immobile</h3>
    <div class="section">
        <div id="intestazione">
            <h5><asp:Label ID="lblTitolo" runat="server" Text="Label"></asp:Label> <span class="rif">[RIF: <%=rif%>]</span></h5>
            <p class="subtitle"><%=addressTitle%></p>
            <div class="subtitle_main">
                <span title="Prezzo"><b><%=prezzo%></b></span>&nbsp;|&nbsp;<span title="Superficie"><%=mq%></span>&nbsp;|&nbsp;<span title="Locali"><%=vani%></span>
            </div>
        </div>
        <div id="container">
            <ul>
                <li><a href="#gallery"><span>Foto</span></a></li>
                <li><a href="#mappa"><span>Mappa</span></a></li>
            </ul>
            <div id="tab-container">
                <div id="gallery" class="gallery">      
                    <ul>      
                        <li id="noimage" runat="server" visible="false">
                            <a href="/BLL/hndImage.ashx?adID=<%=IDAnnuncio %>&id=999" title="Nessuna immagine">
                                <img alt="Immagine" src="/BLL/hndImage.ashx?adID=<%=IDAnnuncio %>&id=999&w=72&h=72" />
                            </a>
                        </li>
                        <asp:Repeater ID="rpImmagini" runat="server">
                            <ItemTemplate>
                                <li>
                                    <a href="/BLL/hndImage.ashx?adID=<%#DataBinder.Eval(Container.DataItem, "IDAnnuncio") %>&id=<%#DataBinder.Eval(Container.DataItem, "IDImmagine") %>" 
                                        title="<%#DataBinder.Eval(Container.DataItem, "Descrizione") %>">
                                        <img alt="Immagine" src="/BLL/hndImage.ashx?adID=<%#DataBinder.Eval(Container.DataItem, "IDAnnuncio") %>&id=<%#DataBinder.Eval(Container.DataItem, "IDImmagine") %>&w=72&h=72" />
                                    </a>
                                </li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
                <div id="mappa">
                    <div id="mapcontainer">
                        <div id="map"></div>
                    </div>
                </div>
            </div>
        </div>
        <div id="dettagli">
            <h2>Dettagli</h2>
            <table cellpadding="5" cellspacing="5">
                <tr>
                    <td class="left">Tipo Contratto:</td>
                    <td class="right">
                        <asp:Label ID="lblTipoContratto" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td class="left">Tipo Immobile:</td>
                    <td class="right">
                        <asp:Label ID="lblTipoImmobile" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>              
                <tr><td colspan="4" class="separe"></td></tr>  
                 <tr>
                    <td class="left">Condizioni:</td>
                    <td class="right">
                        <asp:Label ID="lblCondizioni" runat="server" Text="N.S."></asp:Label>
                    </td>
                    <td class="left">Anno Fabbricazione:</td>
                    <td class="right">
                        <asp:Label ID="lblAnnoFabbricazione" runat="server" Text="N.S."></asp:Label>
                    </td>
                </tr> 
                <tr><td colspan="4" class="separe"></td></tr>   
                 <tr>
                    <td class="left">Bagni:</td>
                    <td class="right">
                        <asp:Label ID="lblBagni" runat="server" Text="N.S."></asp:Label>
                    </td>
                    <td class="left">Termoautonomo:</td>
                    <td class="right">
                        <asp:Label ID="lblTermoautonomo" runat="server" Text="N.S."></asp:Label>
                    </td>
                </tr>   
                <tr><td colspan="4" class="separe"></td></tr>   
                 <tr>
                    <td class="left">Piano:</td>
                    <td class="right">
                        <asp:Label ID="lblPiano" runat="server" Text="N.S."></asp:Label>
                    </td>
                    <td class="left">Locali:</td>
                    <td class="right"><%=vani %></td>
                </tr> 
                <tr><td colspan="4" class="separe"></td></tr>   
                <tr>
                    <td class="left">Prezzo:</td>
                    <td class="right"><%=prezzo %></td>
                    <td class="left">Superficie:</td>
                    <td class="right"><%=mq%></td>
                </tr>  
                <tr><td colspan="4" class="separe"></td></tr>   
                <tr>
                    <td class="left">Note:</td>
                    <td colspan="3">
                        <asp:Label ID="lblNote" runat="server" Text="Nessuna nota"></asp:Label>
                    </td>
                </tr>  
            </table>
        </div>
        <div id="descrizione">
            <h2>Descrizione</h2>
            <asp:Literal ID="ltDescrizione" runat="server"></asp:Literal>
        </div>
    </div>
</asp:Content>
